<?php use_helper('Validation'); ?>

<div id="user_top">
  <span class="br"></span>
  <span class="bl"></span>
  <span class="tr"></span>
  <span class="tl"></span>
  <div id="img">
    <?php echo image_tag('thumb-70_70_zc.jpg'); ?>
  </div>
  <h2 class="six">
    <?php
      echo link_to($subscriber->__toString(), "user/".$subscriber->getUsername());
    ?>
  </h2>
  <div class="f11">
    Profilo utente: <?php echo $subscriber->getProfile(); ?> Membro da: <?php echo $subscriber->getCreatedOn(); ?>
  </div>
  <ul id="user_tabs" class="f2">
    <li>
      <a class="selected" href="#">
        <span class="tr"></span>
        <span class="tl"></span>
      Profile</a>
    </li>
    <li>
      <a href="#">
        <span class="tr"></span>
        <span class="tl"></span>
      Contributions</a>
    </li>
  </ul>
</div>

<div id="user_contents">
  <div id="user_leftcenter">
    <div class="header">
      <h3>Informazioni personali</h3>
      <?php if ($subscriber->getId() == $sf_user->getSubscriberId()): ?>
      <ul class="link_right">
        <li><?php 
          echo image_tag('icons/user_edit.png');
          echo link_to('Modifica', '@current_user_edit', array('class'=>'f3'));
        ?></li>
      </ul>
      <?php endif; ?>
    </div>
    <div class="item">
      <div class="fright"><?php echo $subscriber->getFirstname(); ?></div>
      <span class="b">Nome:</span>
    </div>
    <div class="item">
      <div class="fright"><?php echo $subscriber->getLastname(); ?></div>
      <span class="b">Cognome:</span>
    </div>
    <div class="item">
      <div class="fright"><?php echo $subscriber->getTitle(); ?></div>
      <span class="b">Titolo:</span>
    </div>
    <div class="item">
      <div class="fright"><?php echo $subscriber->getEmail(); ?></div>
      <span class="b">Email:</span>
    </div>
    <div class="item">
      <div class="fright"><?php echo $subscriber->getPhone(); ?></div>
      <span class="b">Telefono:</span>
    </div>
    <div class="item">
      <div class="fright"><?php echo $subscriber->getMobile(); ?></div>
      <span class="b">Cellulare:</span>
    </div>
    <div class="item">
      <div class="fright"><?php echo $subscriber->getFax(); ?></div>
      <span class="b">Fax:</span>
    </div>

    <div class="header">
      <h3>Parametri di connessione</h3>
    </div>
    <div class="item">
      <div class="fright"><?php echo $subscriber->getUsername(); ?></div>
      <span class="b">Login:</span>
    </div>
    <?php if ($subscriber->getId() == $sf_user->getSubscriberId()): ?>
    <div class="item">
      <div class="fright">
      <?php 
          echo image_tag('icons/user_edit.png');
          echo link_to('Modifica password', '@password_upgrade', array('class'=>'f3'));
      ?>
      </div>
      <span class="b">Password:</span>
    </div>
    <?php endif; ?>
 
  </div>
  <div id="user_right">
    <div class="header">
      <h3>Statistiche</h3>
    </div>
    <div id="user_statistics">
      <div class="item">
        <div class="fright">125</div>
        <span class="b">Progetti:</span>
      </div>
      <div class="item">
        <div class="fright">232</div>
        <span class="b">Ordini:</span>
      </div>
      <div class="item">
        <div class="fright">1500</div>
        <span class="b">Messaggi:</span>
      </div>
    </div>
  </div>
</div>
